def demo(v):
    small = big = digit = other =0
    for i in v:
        if 'A'<=i<='Z':
            big+=1
        elif 'a'<=i<='z':
            small+=1
        elif '0'<=i<='9':
            digit+=1
        else:
            other+=1
    return (big,small,digit,other)
s =input()
print(demo(s),end="")